package com.surpassun.emall.service;

import java.util.List;


public interface AbstractService<T> {

	public void add(T entity);
	
	public void update(T entity);

	public void delete(T entity);

	public T get(long id);
	
	public List<T> getAll();
	
	public List<T> getRange(int start, int end);
	
	public T getSingleByField(String fieldName, Object fieldValue, String restrictionType);
	
	public List<T> getByField(String fieldName, Object fieldValue, String restrictionType);
	
	public List<T> getByFields(String[] fieldNames, Object[] fieldValues, String[] restrictionTypes);
	
	public int count();
}